--[[/**
-- * 
 * 恢复能量时,额外恢复N
-- */]]

---@class BuffEffect505100 : BaseBuffEffect
BuffEffect505100 = ClientFight.CreateClass("BuffEffect505100", ClientFight.BaseBuffEffect)
local t = BuffEffect505100

---@param fight Fight
---@param buff FighterBuff
function t:action(fight, buff, ...)
    local parameters = {...};
    if not parameters[3] then
        return IBuffEffect.FAIL;
    end

    local result = parameters[3];
    local damage = result.damage;
    if (damage == 0) then
        return IBuffEffect.FAIL;
    end
    local add = Utils.calcRatio(damage, buff.buffBean.f_BuffEffectValue[1]);
    result.damage = damage + add;
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff"
            .. buff.modelId .. " 额外恢复能量 : " .. damage .. " 总恢复能量: " .. result.damage);
    return ClientFight.BaseBuffEffect.action(self, fight, buff, ...);
end

t.New()